package com.dumovie.security;

import java.util.Map;

import org.apache.shiro.authc.AuthenticationToken;

public class StatelessToken implements AuthenticationToken {  
    private String username;  
    private Map<String, ?> params;  
    private String clientDigest;  
    public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public Map<String, ?> getParams() {
		return params;
	}
	public void setParams(Map<String, ?> params) {
		this.params = params;
	}
	public StatelessToken() {
		super();
		// TODO Auto-generated constructor stub
	}
	public StatelessToken(String username, Map<String, ?> params,
			String clientDigest) {
		this.username = username;
		this.params = params;
		this.clientDigest = clientDigest;
	}
	public String getClientDigest() {
		return clientDigest;
	}
	public void setClientDigest(String clientDigest) {
		this.clientDigest = clientDigest;
	}
	//省略部分代码  
    public Object getPrincipal() {  return username;}  
    public Object getCredentials() {  return clientDigest;}  
}   